-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update TASTy reader to support Scala 3.1 #9791
Update TASTy reader to support Scala 3.1 #9791
Conversation
Open question: should we support |
@bishabosha I don't seem to have permission to push to your branch, but it needs diff --git src/compiler/scala/tools/nsc/tasty/bridge/TreeOps.scala src/compiler/scala/tools/nsc/tasty/bridge/TreeOps.scala
index 5a82115d65..82d82af03a 100644
--- src/compiler/scala/tools/nsc/tasty/bridge/TreeOps.scala
+++ src/compiler/scala/tools/nsc/tasty/bridge/TreeOps.scala
@@ -12,7 +12,7 @@
package scala.tools.nsc.tasty.bridge
-import scala.tools.nsc.tasty.{TastyUniverse, TastyModes, ForceKinds}, TastyModes._, ForceKinds._
+import scala.tools.nsc.tasty.{TastyUniverse, TastyModes}, TastyModes._
import scala.tools.tasty.TastyName
import scala.reflect.internal.Flags to remove unused imports. You can test this locally with |
That seems desirable to me (but not a blocker for 2.13.7, of course). |
otherwise LGTM, but perhaps @lrytz would like to give it a once-over |
Can it read opaque type from a package? For example:
In Scala 2.13.6 opaque type must be inside object A otherwise compile error. |
@timothyklim currently in 2.13, top level definitions from Scala 3 can only be used from their wrapper object, e.g. if that code was in |
LGTM too |
6cdcd8d
to
7833232
Compare
I realised now that 7833232 is still forcing the annotation class (to get primaryConstructor), just not explicitly - it's still not causing an issue but something to note. |
As well as implementing changes for TASTy in Scala 3.1.0, also implements a few fixes: